﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.MinimapIcon, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.VirtualUIObject, "ScriptType"))

	_DB:AddCodeHelp("OnPositionChanged", [[ScriptType, Run when the MinimapIcon's position is changed]], [[OnPositionChanged()]])
	_DB:AddCodeHelp("OnDragStop", [[ScriptType, Run when stop dragging the icon]], [[OnDragStop()]])
	_DB:AddCodeHelp("OnLeave", [[ScriptType, Run when mouse is leaving the icon]], [[OnLeave()]])
	_DB:AddCodeHelp("OnDragStart", [[ScriptType, Run when start dragging the icon]], [[OnDragStart()]])
	_DB:AddCodeHelp("OnGameTooltipShow", [[ScriptType, Run when the mouse is over the icon, and the tooltip is setted.]], [[OnGameTooltipShow(GameTooltip)]])
	_DB:AddCodeHelp("OnClick", [[ScriptType, Run when icon is clicked]], [[OnClick(button, down)]])
	_DB:AddCodeHelp("OnEnter", [[ScriptType, Run when mouse is over the icon]], [[OnEnter()]])
	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.MinimapIcon, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.VirtualUIObject, "Function"))

	_DB:AddCodeHelp("Show", [=[Shows the region]=], [=[Show()]=])
	_DB:AddCodeHelp("IsVisible", [=[Returns whether the region is visible]=], [=[IsVisible()]=])
	_DB:AddCodeHelp("SetIcon", [=[Sets the MinimapIcon's icon texutre]=], [=[SetIcon(iconPath)]=])
	_DB:AddCodeHelp("Dispose", [=[Dispose, release resource]=], [=[Dispose()]=])
	_DB:AddCodeHelp("IsShown", [=[Returns whether the region is shown]=], [=[IsShown()]=])
	_DB:AddCodeHelp("Hide", [=[Hides the region]=], [=[Hide()]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.MinimapIcon, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.VirtualUIObject, "Property"))

	_DB:AddCodeHelp("Visible", [[the visible of the icon]], IGAS:GetPropertyType("boolean"))
	_DB:AddCodeHelp("Menu", [[if setted, the menu will be shown when right-click the icon]], IGAS:GetPropertyType("Object"))
	_DB:AddCodeHelp("Position", [[the position of the icon]], IGAS:GetPropertyType("MiniMapPosition"))
	_DB:AddCodeHelp("Tooltip", [[the tooltip head to be shown when the cursor is over the icon]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("Text", [[the text to be diplayed on the icon]], IGAS:GetPropertyType("string"))
end
